/**
 * Created by Administrator on 2017/7/27.
 */

(function (w) {
    var apiHost='http://www.jhjvip.cn:8083';
    //var apiHost=' http://192.168.199.107:8081';
    //var apiHost=' http://192.168.199.104:8080';

    //威哥服务器
    //var apiHost=' http://192.168.199.132:8080';
    //配置项
    w.C={};
    //域名
    C.host=apiHost+'/mall/mobile/';

    //分享出去的url
    //C.share='http://192.168.199.200:3000/git/huifaShop/html/share_red_package.html';
    C.share='http://www.jhjvip.cn/gongzh/html/share_red_package.html';

    //是否开启打印日志
    C.debug=true;
    //是否正在维护
    C.isWeihu=false;
    //手机验证正则
    C.phoneReg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
    //邮箱验证正则
    C.emailReg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
    //安全码验证正则
    C.selfNumberReg = /^[0-9a-zA-Z]{8,16}$/;
    //发送验证码时间
    C.putCodeTime=60;


    //var token='2017091814287384479dc2fcbc776c4e34a1d9f9ad2b297b9d';
    //localStorage.setItem('token','201710181027383318e7736e911e0b43f2a273fad672406ed6');
    C.token=localStorage.getItem('token');

    //强制刷新当前页面
    C.version=Math.random();

    //接口
    C.interface={
        //折扣商城
        discount:'product/index',
        //修改昵称
        name:'uc/edit',
        //商品详情
        detail:'product/detail',
        //商品详情-所有评价
        detailFeedbacks:'product/feedbacks',
        //意见反馈
        opinion:'uc/feedback/add',
        //商品类别
        selectType:'index/categorys',
        //显示所有的收货地址
        allAddress:'uc/address/list',
        //添加收货地址
        addAddress:'uc/address/add',
        //修改收货地址
        insertAddress:'uc/address/edit',
        //判断用户添加地址时是不是第一个
        isOneAddress:'order/isOneAddress',
        //提交订单是更换收货地址  设置默认收货地址
        changeAddress:'uc/address/defaultSet',
        //秒杀获取默认的收货地址
        getShouHuoAddress:'uc/address/getDefault',
        //删除收货地址
        deleteAddress:'uc/address/delete',
        //判断用户添加的地址是否是第一个
        oneAddress:'order/isOneAddress',
        //预生成订单
        preCreateOrder:'order/preCreate',
        //生成订单
        createOrder:'order/create',
        //我的订单
        myOrder:'order/list',
        //我的物流信息
        wuliu:'wuliu/getWuliuProdcut',
        //确认收货
        confirmGoods:'order/confirm',
        //退款
        tuikuan:'order/comeback',
        //用户评价
        userPingjia:'order/feedback',
        //登录
        loginin:'login/in',
        //客服电话
        kefuTel:'company/phone',
        //个人中心
        memberInfo:'uc/index',
        //京东商品
        jdShop:'jd/index',
        //获取用户userId
        userId:'uc/msg',
        //京东二合一接口
        erHeYi:'jd/convert',
        //判断用户是否已经绑定手机号
        isBindPhone:'uc/phone/view',
        //绑定手机号
        bindingtel:'uc/phone/bind',
        //秒杀首页
        seckill:'seckill/list',
        //秒杀详情
        seckillDetail:'seckill/detailWithToken',
        //秒杀top 123
        seckillTop:'seckill/top123',
        //秒杀轮播
        seckillBanner:'seckill/banners',
        //用户点击秒杀商品时
        seckillBuy:'seckill/buy',
        //开始秒杀
        seckillPayBegin:'seckill/payBegin',
        //秒杀真正生成订单
        seckillRealOrder:'order/secCreate',
        //模拟支付成功回调
        wxPay:'pay/wxsuccess',
        //获取微信配置
        wxJsApi:'login/in',
        //登录预生成token
        preCreateToken:'login/preCreateToken',
        //红包详情页
        redIndex:'hongbao/index',
        //领取红包
        redGet:'hongbao/get',
        //红包列表
        redList:'hongbao/list',
        redDel:'hongbao/del',
        //添加购物车
        addCart:'cert/add',
        //购物车详情
        cartDetail:'cert/index',
        //购物车商品数量减
        cartNumberJian:'cert/sub',
        //购物车商品数量加
        cartNumberJia:'cert/add',
        //购物车删除
        cartDelete:'cert/del',
        //更新购物车商品数量
        cartUpdate:'cert/update',
        //购物车去结算
        cartJieSuan:'cert/preJiesuan',
        // 发送验证码
        send: 'uc/phone/send',
        //取消订单
        del: 'order/del',
        //首页banner
        homeBanner:'index/banners',
        //修改后的秒杀接口
        homeSeckill:'index/seckills',
        //修改后的首页爆款
        homeBaokuan:'index/baokuans',
        //修改后的首页banner跳转后详情
        bannerJump:'index/bannerDetail',
        //京东订单
        jdOrder:'/jd/orders'
    };
    //组合接口地址
    for (k in C.interface){
        C.interface[k]=C.host + C.interface[k];
    }


})(window);













